var SearchForm = function () {
  var template = /* html */ `
    <div class="search-form">
      <el-form inline label-width="auto">
        <el-form-item label="仪表编号">
          <el-input class="search-input" v-model="search.no" placeholder="请输入仪表编号"></el-input>
        </el-form-item>
        <el-form-item label="仪表名称">
          <el-input class="search-input" v-model="search.name" placeholder="请输入仪表名称"></el-input>
        </el-form-item>
        <el-form-item label="仪表类型">
          <el-select clearable class="search-input" v-model="search.energyType" placeholder="请选择仪表类型">
            <el-option v-for="item in energyTypeList" :key="item.value" :value="item.value" :label="item.label">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="仪表位置">
          <el-input class="search-input" v-model="search.address" placeholder="请输入仪表位置"></el-input>
        </el-form-item>
        <el-form-item label="使用状态">
          <el-select  clearable class="search-input" v-model="search.state" placeholder="请选择使用状态">
            <el-option v-for="item in stateList" :key="item.value" :value="item.value" :label="item.label">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="状态">
          <el-select  clearable class="search-input" v-model="search.isAgree" placeholder="请选择状态">
            <el-option v-for="item in isAgreeList" :key="item.value" :value="item.value" :label="item.label">
            </el-option>
          </el-select>
        </el-form-item>
      </el-form>
    </div>
  `;

  return {
    props: {
      search: {
        type: Object,
        required: true
      }
    },

    data: function () {
      return {
        energyTypeList: i18n.getDropDown('energyMgr.energyType', [1, 2, 3]),
        stateList: i18n.getDropDown('energyMgr.state', [1, 2]),
        isAgreeList: i18n.getDropDown('energyMgr.isAgree', [1, 2])
      };
    },

    template: template
  };
}();
